/*
 * SimpleRole.java
 *
 * Created on 15 luty 2007, 19:08
 *
 */

package arocms.security;

import java.io.Serializable;

/**
 *
 * @author arek
 */
public class SimpleRole implements Role, Serializable{
    
    public enum Roles {ADMIN, USER, PUBLIC};
    
    private Roles actualRole;
    
    /** Creates a new instance of SimpleRole */
    public SimpleRole() {
        actualRole = Roles.PUBLIC;
    }
    
    public Roles getActualRole() {
        return actualRole;
    }
    
    public void setActualRole(Roles actualRole) {
        this.actualRole = actualRole;
    }
    
    public String toString() {
        switch (actualRole) {
            case ADMIN:  return "ADMIN";
            case PUBLIC: return "PUBLIC";
            case USER:   return "USER";
        }
        return "unknown";
    }
}
